// api/contentInfo.js
export const getContentDetail = async (id) => {

    try {
        console.log('getContentList request');
        const response = await uni.$http.get('/blogArticleView/getContentInfo',
            {id:id});

        console.log(response);
        if (response.statusCode !== 200) {
            uni.showToast({
                title: '数据请求失败! ',
                duration: 1500,
                icon: 'none',
            });
            return [];
        }
        return response.data;
    } catch (error) {
        console.error('Network request failed:', error);
        uni.showToast({
            title: '网络请求失败! ',
            duration: 1500,
            icon: 'none',
        });
        return [];
    }
}